/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, ScrollView, Image} from 'react-native';
import {Util} from '../util'
const instructions = Platform.select({
  ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
  android:
    'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
});

type Props = {};
export default class detail extends Component<Props> {
  static navigationOptions=({navigation,navigationOptions}) => {
    return {
      title: navigation.getParam('title'),
    };
  };
  render() {
    return (
        <ScrollView style={styles.container}>
          <View style={styles.center}>
            <Text style={styles.text}>附近卫生间并导航</Text>
            <View style={styles.items}>
              <Image
                  resizeMode="contain"
                  style={styles.icon}
                  source={require('./功能介绍3.png')}
              />
            </View>
          </View>

          <View style={styles.center}>
            <Text style={styles.text}>实时天气预报</Text>
            <View style={styles.items}>
              <Image
                  resizeMode="contain"
                  style={styles.icon}
                  source={require('./功能介绍1.png')}
              />
            </View>
          </View>
          <View style={styles.center}>
            <Text style={styles.text}>阅读美好文章</Text>
            <View style={styles.items}>
              <Image
                  resizeMode="contain"
                  style={styles.icon}
                  source={require('./功能介绍2.png')}
              />
            </View>
          </View>
        </ScrollView>
    );
  }
}

const styles = StyleSheet.create({
  container:{
    flex: 1,
  },
  center:{
    justifyContent:'center',
    alignItems: 'center'
  },
  icon:{
    width:300,
    height:530
  },
  items:{
    width:300,
    marginBottom:10,
    shadowOpacity: 1,
    shadowColor: '#ccc',
    shadowOffset:{width: 1*Util.pixel, height: Util.pixel},
  },
  text:{
    fontSize:16,
    fontWeight:'300',
    marginBottom:15,
    marginLeft:10,
    marginTop:15
  }
});
